﻿<ion-modal-view ng-controller="CustomersCtrl">
    <ion-header-bar class="bar-stable nav-bar-block nav-title-slide-ios7">
        <button class="button button-clear " ng-click="closePageModel()"><i class="icon ion-ios-arrow-left"></i></button>
        <h1 class="title">客户管理</h1>
        <button class="button button-clear" ng-click="openSearch()"><i class=" icon ion-ios-search "></i></button>
    </ion-header-bar>
    <div class="bar bar-subheader lr-subheader">
        <div class="lr-left-tool">
            <div class="lr-down-select"><span>全部</span><span class="num">{{data.records}}条</span><span><i class="icon ion-ios-arrow-down"></i></span></div>
        </div>
        <div class="lr-right-tool">
            <button class="button button-clear"><i class="icon iconfont">&#xe6f5;</i></button>
            <button class="button button-clear"><i class="icon iconfont">&#xe654;</i></button>
        </div>
    </div>
    <ion-content delegate-handle="customerlist-content">
        <ion-refresher pulling-text="下拉刷新" on-refresh="doRefresh()"></ion-refresher>
        <div class="list  list-inset lr-list-type2" style="margin-top:40px;">
            <ion-list>
                <ion-item ng-repeat="customer in data.customers" class="mt10" ng-click="openDetailsModal(customer.customerId)">
                    <div>
                        <div class="row">
                            <div class="col-80"><span class="lr-title">{{customer.fullName}}</span></div>
                            <div class="col-20"><span class="lr-title" style="text-align:right;">{{customer.lastDate}}</span></div>
                        </div>
                        <div class="row">
                            <div class="col-33"><div class="lr-label {{customer.custIndustrybgColor}}">{{customer.custIndustryId}}</div></div>
                            <div class="col-33 lr-item-content">
                                <p><i class="icon ion-ios-person positive"></i><span>{{customer.contact}}</span></p>
                                <p><i class="icon ion-ios-telephone-outline royal"></i><span>{{customer.mobile}}</span></p>
                            </div>
                            <div class="col-33 lr-item-content">
                                <p><i class="icon ion-ios-personadd balanced"></i><span>跟进-{{customer.traceUserName}}</span></p>
                                <p><i class="icon ion-ios-flame-outline energized"></i><span>{{customer.custDegreeId}}</span></p>
                            </div>
                        </div>
                    </div>
                    <ion-option-button ng-click="doDelete(customer)">
                        <span class="lr-trash-circled"><i class="icon ion-ios-trash-outline"></i></span>
                    </ion-option-button>
                </ion-item>
            </ion-list>
        </div>
        <ion-infinite-scroll ng-if="data.moredata" on-infinite="doLoadMore()" distance="1%"></ion-infinite-scroll>
    </ion-content>
    <div class="lr-plug-btn">
        <i class=" icon ion-ios-plus positive" ng-click="openEditModal()"></i>
    </div>
</ion-modal-view>
